package com.company.设计模式.单例模式;

/**
 * @author uguoy089
 * @Description:
 * @Date: 2021/5/11 09:08
 */

public class Singleton2 {
    private static Singleton2 instance = new Singleton2();

    private Singleton2() {
        System.out.println("饿汉式");
    }

    public static Singleton2 getInstance() {
        return instance;
    }
}
